<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <title>Title</title>
</head>
<body>
<script>
  let obj = {
    name: 'max',
    age: 28,
    a: 1,
    b: 2,
    c: 3
  }
  // 别名
  // let {name: str} = obj
  // console.log(str)

  // 默认值
  // let {c=100} = obj
  // console.log(c)

  // 别名和默认值
  // let {gender:g='abc'} = obj
  // console.log(g)

  // 剩余模式
  // let {age, ...r} = obj
  // console.log(age, r)

  let arr = 'maxljd'.split('')
  // let [f,,l] = arr
  // console.log(f, l)

  // 剩余模式
  /*let [a, b, ...r] = arr
  console.log(a, b, r)*/
</script>
</body>
</html>